package com.notary.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 公证卷宗基本信息
 * </p>
 *
 * @author xujun
 * @since 2020-07-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_contract")
@ApiModel(value = "Contract对象", description = "公证卷宗基本信息")
public class Contract implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;

    @ApiModelProperty(value = "受理编号")
    private String transNo;

    @ApiModelProperty(value = "卷宗编号")
    private String notaryNo;

    @ApiModelProperty(value = "公证书编号")
    private String certificateNo;

    @ApiModelProperty(value = "归档人姓名")
    private String archive;

    @ApiModelProperty(value = "归档时间")
    private Date archiveDate;

    @ApiModelProperty(value = "保管期限")
    private String retentionPeriod;

    @ApiModelProperty(value = "保管类型")
    private String retentionType;

    @ApiModelProperty(value = "类别")
    private String type;

    @ApiModelProperty(value = "公证事项（事务）")
    private String notaryItem;

    @ApiModelProperty(value = "申请人")
    private String applicant;

    //案件当前状态  -1不予受理   1申请与初核  2受理  3审查  4审批 -2拟定公证词 5制证 6发证 7归档 8收费
    @ApiModelProperty(value = "流程状态")
    private Integer status;

    @ApiModelProperty(value = "公证员编码")
    private String notaryId;

    @ApiModelProperty(value = "公证员姓名")
    private String notaryName;

    @ApiModelProperty(value = "助理编码")
    private String assistantId;

    @ApiModelProperty(value = "助理姓名")
    private String assistantName;

    @ApiModelProperty(value = "受理地点")
    private String acceptAddress;

    @ApiModelProperty(value = "受理日期")

    private Date acceptDate;


    @ApiModelProperty(value = "申请日期")
    private Date applyDate;

    @ApiModelProperty(value = "使用地")
    private String syd;

    @ApiModelProperty(value = "认证 0 否 1 是")
    private String auth;

    @ApiModelProperty(value = "紧急度 0 普通,1 加急")
    private String priority;

    @ApiModelProperty(value = "领证地点")
    private String issueAddress;

    @ApiModelProperty(value = "领证日期")
    private String issueDate;

    @ApiModelProperty(value = "乐观锁")
    private Integer revision;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "出证时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date issuingTime;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "核实函生成时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkTime;

    @ApiModelProperty(value = "份数")
    private Integer fs;

    @ApiModelProperty(value = "类别")
    private String lb;

    @ApiModelProperty(value = "类型")
    private String lx;

    /**
     * 公证服务费
     **/
    private BigDecimal charge;

    /**
     * 快递公司名称
     **/
    private String shipperName;
    /**
     * 物流单号
     **/
    private String logisticCode;

    @ApiModelProperty(value = "机构编号")
    private String orgno;

    @ApiModelProperty(value = "机构名称")
    private String org;

    @ApiModelProperty(value = "用途")
    private String yt;

    private String dataType;
    @TableField(exist = false)
    private String ownerName;

    @ApiModelProperty(value = "是否申请强制执行 0申请中  1申请成功 -1申请失败")
    private Integer executionType;

    private String gzNo;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "驳回原因")
    private String reason;

    @ApiModelProperty(value = "公证书存证文件哈希值")
    private String notarybookHashcode;

    @ApiModelProperty(value = "执行证书存证文件哈希值")
    private String executebookHashcode;

    @ApiModelProperty("存证出证文件哈希")
    private String depositHashcode;


}
